package cn.lhx.blog.plugin.flashPlayer;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.util.ArrayList;
import java.util.List;

import org.xmappr.RootElement;

/*
 * 播放列表
 */
@RootElement
public class PlayList {
	@org.xmappr.Element(targetType=cn.lhx.blog.plugin.flashPlayer.TrackList.class)
	private List<TrackList> trackList=new ArrayList<TrackList>();
	
	
	public List<TrackList> getTrackList() {
		return trackList;
	}

	public void setTrackList(List<TrackList> trackList) {
		this.trackList = trackList;
	}


	public static void main(String[] args) {
		String xmlFileStr="E:/WebWorkspaces/Jsp/SSHMyBlog/WebRoot/content/fmp-jw-files/playlists/fmp_jw_widget_playlist.xml";
		PlayList playList=PlayerHelper.loadPlayList(xmlFileStr);
		File xmlFile=new File(xmlFileStr);
		FileReader reader;
		try {
			reader = new FileReader(xmlFile);
			
			System.out.println(reader.getEncoding());
			char[] cbuf=new char[1024];
			reader.read(cbuf);
			System.out.println(new String(cbuf));
			System.out.println(playList.getTrackList().size());
			System.out.println(playList.getTrackList().get(0));
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
	}





		

	}